package com.sdy.healthcode.biz.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sdy.common.model.BizException;
import com.sdy.healthcode.biz.dto.CommunityActionDTO;
import com.sdy.healthcode.biz.dto.UserActionPost;
import com.sdy.healthcode.biz.model.HealthCode;
import com.sdy.healthcode.biz.model.UserAction;
import com.sdy.mvc.service.BaseService;

import java.util.Date;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zzq
 * @since 2020-02-18
 */
public interface UserActionService extends BaseService<UserAction> {
    void takeAction(UserActionPost userActionPost, HealthCode healthCode) throws BizException;
    Integer countUserAction(Integer userId);

    /**
     * 社区出入情况
     * @param page 分页格式
     * @param area 区县
     */
    IPage<CommunityActionDTO> pageCommunityAction(IPage<CommunityActionDTO> page, String area);

    /**
     * 预约到院人数
     */
    Integer countHospitalIn(Date date);

    /**
     * 已经到院人数
     * @return
     */
    Integer countHospitalOut(Date date);

    /**
     * 院内等待人数
     */
    Integer countHospitalWait(Date date);

    /**
     * 取消就诊人数
     */
    Integer countAppointmentCanceled(Date date);
}
